# -*- coding:utf-8 -*-
# @FileName  :ent_reqresult.py
# @Time      :2020/12/16 9:51
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class EntReqResultRequest:
    @classmethod
    def get_page(cls,curPage,
                    maxSize,
                    search_EQ_enterpriseName,
                    search_EQ_signCode,
                    search_EQ_uniformSocialCredCode,
                    search_EQ_orgInstCode,
                    search_EQ_qryReason,
                    search_EQ_queryFormat,
                    search_EQ_queryType,
                    search_EQ_status,
                    search_EQ_resultStatus,
                    search_GTE_LTE_operTime_DATE_RANGE,cookie):
        params = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_queryFormat':search_EQ_queryFormat,
            'search_EQ_queryType':search_EQ_queryType,
            'search_EQ_status':search_EQ_status,
            'search_EQ_resultStatus':search_EQ_resultStatus,
            'search_GTE_LTE_operTime_DATE_RANGE':search_GTE_LTE_operTime_DATE_RANGE
        }
        req = Request(ServerUrl.ent_reqresult_getpage_url,params=params,headers=cookie)
        return req.get()

    @classmethod
    def resubmit_task(cls,ids,cookie):
        params = {
            'ids':ids
        }
        req = Request(ServerUrl.ent_resubmit_getpage_url,params=params,headers=cookie)
        return req.post()

    @classmethod
    def detail(cls,id,cookie):
        '''详情框架'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_reqresult_detail_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def reqresult_findbyid(cls,id,cookie):
        '''查看详情-基本信息'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_reqresult_findbyid_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def archive_findbyid(cls,id,cookie):
        '''查看详情-授权信息'''
        data = {
            'id': id
        }
        req = Request(ServerUrl.ent_archive_findbyid_url, data=data, headers=cookie)
        return req.post()

    @classmethod
    def findbyarchiveid(cls,archiveId,cookie):
        '''查看详情-授权档案信息'''
        data = {
            'archiveId':archiveId
        }
        req = Request(ServerUrl.ent_findbyarchiveid_url,params=data,headers=cookie)
        return req.get_list()

    @classmethod
    def applyreport(cls,archiveId,
                        archiveViewStatus,
                        assocbsnssData,
                        checkinfoId,
                        clientIp,
                        enterpriseName,
                        creditUser,
                        ext1,
                        ext2,
                        ext3,
                        ext4,
                        ext5,
                        ext6,
                        id,
                        note,
                        operOrg,
                        operTime,
                        operator,
                        president,
                        qryReason,
                        queryFormat,
                        queryTime,
                        queryType,
                        reason,
                        refuseReasons,
                        rekOrg,
                        rekTime,
                        rekType,
                        rekUser,
                        remarks,
                        reqId,
                        resCode,
                        resMsg,
                        resultStatus,
                        resultType,
                        serialNumber,
                        source,
                        status,dsRegiNo,frgCorpNo,gsRegiNo,
                        orgCreditCode,orgInstCode,regiTypeCode,
                        uniformSocialCredCode,cookie):
        '''异步查询检查本地报告'''
        data = {
            'archiveId':archiveId,
            'archiveViewStatus':archiveViewStatus,
            'assocbsnssData':assocbsnssData,
            'checkinfoId':checkinfoId,
            'clientIp':clientIp,
            'enterpriseName':enterpriseName,
            'creditUser':creditUser,
            'ext1':ext1,
            'ext2':ext2,
            'ext3':ext3,
            'ext4':ext4,
            'ext5':ext5,
            'ext6':ext6,
            'id':id,
            'note':note,
            'operOrg':operOrg,
            'operTime':operTime,
            'operator':operator,
            'president':president,
            'qryReason':qryReason,
            'queryFormat':queryFormat,
            'queryTime':queryTime,
            'queryType':queryType,
            'reason':reason,
            'refuseReasons':refuseReasons,
            'rekOrg':rekOrg,
            'rekTime':rekTime,
            'rekType':rekType,
            'rekUser':rekUser,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'resultStatus':resultStatus,
            'resultType':resultType,
            'serialNumber':serialNumber,
            'source':source,
            'status':status,
            'dsRegiNo':dsRegiNo,
            'frgCorpNo':frgCorpNo,
            'gsRegiNo':gsRegiNo,
            'orgCreditCode':orgCreditCode,
            'orgInstCode':orgInstCode,
            'regiTypeCode':regiTypeCode,
            'uniformSocialCredCode':uniformSocialCredCode
        }

        req = Request(ServerUrl.ent_reqresult_applyreport_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def showcreditreport(cls,archiveId,
                        archiveViewStatus,
                        assocbsnssData,
                        checkinfoId,
                        clientIp,
                        enterpriseName,
                        creditUser,
                        ext1,
                        ext2,
                        ext3,
                        ext4,
                        ext5,
                        ext6,
                        id,
                        note,
                        operOrg,
                        operTime,
                        operator,
                        president,
                        qryReason,
                        queryFormat,
                        queryTime,
                        queryType,
                        reason,
                        refuseReasons,
                        rekOrg,
                        rekTime,
                        rekType,
                        rekUser,
                        remarks,
                        reqId,
                        resCode,
                        resMsg,
                        resultStatus,
                        resultType,
                        serialNumber,
                        source,
                        status,dsRegiNo,frgCorpNo,gsRegiNo,
                        orgCreditCode,orgInstCode,regiTypeCode,
                        uniformSocialCredCode,cookie):
        '''异步查询信用报告'''
        data = {
            'archiveId':archiveId,
            'archiveViewStatus':archiveViewStatus,
            'assocbsnssData':assocbsnssData,
            'checkinfoId':checkinfoId,
            'clientIp':clientIp,
            'enterpriseName':enterpriseName,
            'creditUser':creditUser,
            'ext1':ext1,
            'ext2':ext2,
            'ext3':ext3,
            'ext4':ext4,
            'ext5':ext5,
            'ext6':ext6,
            'id':id,
            'note':note,
            'operOrg':operOrg,
            'operTime':operTime,
            'operator':operator,
            'president':president,
            'qryReason':qryReason,
            'queryFormat':queryFormat,
            'queryTime':queryTime,
            'queryType':queryType,
            'reason':reason,
            'refuseReasons':refuseReasons,
            'rekOrg':rekOrg,
            'rekTime':rekTime,
            'rekType':rekType,
            'rekUser':rekUser,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'resultStatus':resultStatus,
            'resultType':resultType,
            'serialNumber':serialNumber,
            'source':source,
            'status':status,
            'dsRegiNo':dsRegiNo,
            'frgCorpNo':frgCorpNo,
            'gsRegiNo':gsRegiNo,
            'orgCreditCode':orgCreditCode,
            'orgInstCode':orgInstCode,
            'regiTypeCode':regiTypeCode,
            'uniformSocialCredCode':uniformSocialCredCode
        }
        req = Request(ServerUrl.ent_reqresult_showcreditreport_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def revealreport(cls,recordId,cookie):
        '''展示报告框架'''
        params={
            'recordId':recordId
        }
        req = Request(ServerUrl.ent_revealreport_url,params=params,headers=cookie)
        return req.get()

    @classmethod
    def localcreditreport(cls,archiveId,
                        archiveViewStatus,
                        assocbsnssData,
                        checkinfoId,
                        clientIp,
                        enterpriseName,
                        creditUser,
                        ext1,
                        ext2,
                        ext3,
                        ext4,
                        ext5,
                        ext6,
                        id,
                        note,
                        operOrg,
                        operTime,
                        operator,
                        president,
                        qryReason,
                        queryFormat,
                        queryTime,
                        queryType,
                        reason,
                        refuseReasons,
                        rekOrg,
                        rekTime,
                        rekType,
                        rekUser,
                        remarks,
                        reqId,
                        resCode,
                        resMsg,
                        resultStatus,
                        resultType,
                        serialNumber,
                        source,
                        status,dsRegiNo,frgCorpNo,gsRegiNo,
                        orgCreditCode,orgInstCode,regiTypeCode,
                        uniformSocialCredCode,cookie):
        '''异步查询时，本地报告查询'''
        data = {
            'archiveId':archiveId,
            'archiveViewStatus':archiveViewStatus,
            'assocbsnssData':assocbsnssData,
            'checkinfoId':checkinfoId,
            'clientIp':clientIp,
            'enterpriseName':enterpriseName,
            'creditUser':creditUser,
            'ext1':ext1,
            'ext2':ext2,
            'ext3':ext3,
            'ext4':ext4,
            'ext5':ext5,
            'ext6':ext6,
            'id':id,
            'note':note,
            'operOrg':operOrg,
            'operTime':operTime,
            'operator':operator,
            'president':president,
            'qryReason':qryReason,
            'queryFormat':queryFormat,
            'queryTime':queryTime,
            'queryType':queryType,
            'reason':reason,
            'refuseReasons':refuseReasons,
            'rekOrg':rekOrg,
            'rekTime':rekTime,
            'rekType':rekType,
            'rekUser':rekUser,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'resultStatus':resultStatus,
            'resultType':resultType,
            'serialNumber':serialNumber,
            'source':source,
            'status':status,
            'dsRegiNo':dsRegiNo,
            'frgCorpNo':frgCorpNo,
            'gsRegiNo':gsRegiNo,
            'orgCreditCode':orgCreditCode,
            'orgInstCode':orgInstCode,
            'regiTypeCode':regiTypeCode,
            'uniformSocialCredCode':uniformSocialCredCode
        }
        req = Request(ServerUrl.ent_show_localcreditreport_url, data=data, headers=cookie)
        return req.post()








if __name__ == "__main__":
    pass